package views.swing;

import java.awt.*;

import java.awt.event.*;
import javax.swing.*;

import models.entities.Cliente;

public class ABCClientes extends GUIClientes implements ActionListener{
	private JButton botonGuardar=new JButton("Guardar");
	private JButton botonCancelar=new JButton("Limpiar");
	private int actIn=0;
	public ABCClientes(){
		inicializar();
	}
	
	public ABCClientes(Cliente cliente,int n){
		super(cliente);
		inicializar();
		actIn=n;
	}
	
	private void inicializar(){
		botonGuardar.addActionListener(this);
		botonCancelar.addActionListener(this);
		
		add(botonGuardar, "label");
		add(botonCancelar, "field");
	}
	
	public void actionPerformed(ActionEvent evt){
		if(evt.getSource()==botonGuardar){
			super.crearCliente(actIn);
		}else{
		   super.limpiar();
		   //campoNombre.requestFocus();
		}
		
}}
	